package com.yunsc.product.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yunsc.product.entity.YunscGoodsServiceRelEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 商品与服务承诺关系记录表
 * 
 * @author adan
 * @email 2028038953@qq.com
 * @date 2024-04-04 21:28:42
 */
@Mapper
public interface YunscGoodsServiceRelDao extends BaseMapper<YunscGoodsServiceRelEntity> {

    @Select("SELECT service_id FROM yunsc_goods_service_rel WHERE goods_id = #{goodsId} AND goods_id = #{storeId}")
    List<Integer> getServiceIdsByGoodsId(@Param("goodsId") Integer goodsId, @Param("storeId") Integer storeId);
}
